<include file="Public/min-header" /> <!--引入 js css img 文件-->
</head>
<body>
    <!--导航  start //-->
    <include file="Public/header" />
    <!--导航 End  //-->
    <div id="main">
        <!--右边菜单-->
        <include file="User/menu" />
        <!--右边菜单End-->
        <div class="mainfr-box">
            <div class="place">
                <span>位置：</span>
                <ul class="placeul">
                    <li><a href="__MODULE__/User/index.html">首页➤</a></li>
                    <li><a href="__MODULE__/User/address.html">收货地址管理</a></li>
                </ul>
                <ul class="placeula">
                    <li><a href="javascript:location.reload()"><span class="placea"></span>刷新</a></li>
                    <li><a href="javascript:history.go(-1)"><span class="placea"></span>返回上一页</a></li>
                </ul>
            </div>
            <div class="clr"></div>
            <form action="__CONTROLLER__/address" method='post' onsubmit="return addresscheck();">
                <input type="hidden" name="id" value="{$list.address_id}" />
                <input type="hidden" name="u_name" value="{$Think.session.dluser.account}" />
                <div class="main">
                <table width="100%" border="0" class="Register-table">
                    <tr class="odd">
                        <th scope="row" width="130">会员编号：</th>
                        <td>{$Think.session.dluser.account}</td>
                        <th scope="row" width="130">呢称姓名：</th>
                        <td>{$user.username}</td>
                    </tr>
                    <tr>
                        <th scope="row">省份：</th>
                        <td colspan="3">
                            <input name="province" type="text" id="huzhu" value="{$list.province}" class="dfinput">
<!--                             <select name="bank" id="bank" class="dfinput">
                                <option value="">--所属省份--</option>
                                <option value="中国银行">中国银行</option>
                            </select>-->
                        </td>
                    </tr>
                    <tr>
                        <th scope="row">城市：</th>
                        <td colspan="3">
                            <input name="city" type="text" value="{$list.city}" class="dfinput">
<!--                             <select name="bank" id="bank" class="dfinput">
                                <option value="">--城市选择--</option>
                                <option value="中国银行">中国银行</option>
                            </select>-->
                        </td>
                    </tr>
                    <tr>
                        <th scope="row">地区：</th>
                        <td colspan="3">
                            <input name="district" type="text" value="{$list.district}" class="dfinput">
<!--                             <select name="bank" id="bank" class="dfinput">
                                <option value="">--地区选择--</option>
                                <option value="中国银行">中国银行</option>
                            </select>-->
                        </td>
                    </tr>
                    <tr>
                        <th scope="row">乡镇：</th>
                        <td colspan="3">
                            <input name="twon" type="text" value="{$list.twon}" class="dfinput">
<!--                             <select name="bank" id="bank" class="dfinput">
                                <option value="">--地区选择--</option>
                                <option value="中国银行">中国银行</option>
                            </select>-->
                        </td>
                    </tr>
                    <tr>
                        <th scope="row">详细地址：</th>
                        <td colspan="3">
                             <input name="address" type="text"  value="{$list.address}" class="dfinput" style="width:500px;">
                        </td>
                    </tr>
                    <tr>
                        <th scope="row">收货人姓名：</th>
                        <td colspan="3">
                             <input name="consignee" type="text"  value="{$list.consignee}" class="dfinput">
                        </td>
                    </tr>
                    <tr>
                        <th scope="row">联系电话：</th>
                        <td colspan="3">
                             <input name="mobile" type="text"  value="{$list.mobile}" class="dfinput">
                        </td>
                    </tr>
                    <tr>
                        <th scope="row">邮政编码：</th>
                        <td colspan="3">
                             <input name="zipcode" type="text" value="{$list.zipcode}" class="dfinput">
                        </td>
                    </tr>
                </table>
                <div class="button-box"><input class="button-style" type="submit" id="but" value="确认修改" ></div>
            </div>
        </div>
        </form>
        <!--foot-->
        <div class="clr"></div>
        <!--footer start //-->
        <include file="Public/footer" />
        <!--footer  end //-->
</body>
</html>
<script>
    function addresscheck()
    {
        var province = $('input[name="province"]').val();
        var city = $('input[name="city"]').val();
      //  var district = $('input[name="district"]').val();
      //  var twon = $('input[name="twon"]').val();
        var address = $('input[name="address"]').val();
        var consignee = $('input[name="consignee"]').val();
        var mobile = $('input[name="mobile"]').val();
        var zipcode = $('input[name="zipcode"]').val();
        if (province == '')
        {
            alert('所属省份不能为空');
            return false;
        }
        if (city == '')
        {
            alert('所属城市不能为空');
            return false;
        }
        if (address == '')
        {
            alert('详细地址不能为空');
            return false;
        }
        if (consignee == '')
        {
            alert('收货人姓名不能为空');
            return false;
        }
        if (mobile == '') {
            alert('联系电话不能为空');
            return false;
        }
        if (zipcode == '')
        {
            alert('邮政编码不能为空');
            return false;
        }
        return true;
    }
</script>